package com.qinaxiwit.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qianxi.wit.pojo.TbSymptoms;
import com.qinaxiwit.mapper.TbSymptomsMapper;
import com.qinaxiwit.service.TbSymptomsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Wrapper;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wyh
 * @since 2021-01-14
 */
@Service
public class TbSymptomsServiceImpl extends ServiceImpl<TbSymptomsMapper, TbSymptoms> implements TbSymptomsService {

    @Autowired
    private TbSymptomsMapper symptomsMapper;

    @Override
    public List<TbSymptoms> findAll() {
        List<TbSymptoms> list = symptomsMapper.findSort();
        return list;
    }

    @Override
    public List<TbSymptoms> findSymptoms(TbSymptoms symptoms) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.like("symptoms_name",symptoms.getSymptomsName());
        return symptomsMapper.selectList(wrapper);
    }
}
